-
Notifications
You must be signed in to change notification settings - Fork 13.6k
editorconfig: don't trim trailing whitespace in tests #144642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
editorconfig: don't trim trailing whitespace in tests #144642
Conversation
Some changes occurred in src/tools/cargo cc @ehuss |
This comment has been minimized.
This comment has been minimized.
9f764bd
to
504a2c1
Compare
How about disabling it only for stdout and stderr files in tests? |
@mati865 there's a few run-make tests that use other file extensions, so collecting a comprehensive list might be a bit tricky. i think more reliable maybe would be disabling it for all |
@lolbinarycat that sounds sensible to me but I'd leave the decision to the reviewer. |
r? compiler |
I would personally also prefer to limit this restriction only to affected tests. I think it's fine for this to be an ad-hoc list of tests where it matters. I would personally love there to be a But 🤷 I think only listing the effected test in the editor config would also be fine, don't have any strong opinions here |
There are over 850 affected tests. |
and these tests rely on their trailing whitespace? as in, how many tests actually intend to have trailing whitespace instead of being cases where we maybe should actually change them to not do so. I don't want to block a change which prevents some editors from silently messing up your PR for the sake of a larger change, so I'd be fine with merging this for now and opening an issue that we should reenable this for at least ui tests and maybe even have a tidy check for it |
504a2c1
to
cad16c3
Compare
cad16c3
to
7af87d1
Compare
There's also 4381 tests that end with multiple newlines, something that has an actual affect on UX, and something that is also (at least in emacs) also controlled by the I re-enabled |
some test snapshot files require trailing whitespace, and previously manually editing those snapshot files (as is required for run-make tests and some platform-specific tests) in an editor with editorconfig support would cause that whitespace to be removed, causing CI failures like this one